#ifndef OLDBITMAP_H
#define OLDBITMAP_H

typedef struct _OldCBitmap
{
	point		cSize;
	uint8 *		cBits;
	int32		cRowBytes;
	HBITMAP		chBmp;
	bool8		cUpsideDown;
} OldCBitmap;

typedef struct _OldCBitmapBuffer
{
	point		cSize;
} OldCBitmapBuffer;

// PUBLIC Common interfaces
//
PLIBEXP pOldCBitmap	newOldCBitmap(char * Name, uint32 Group);
PLIBEXP pOldCBitmap	newOldCBitmapBlank(int32 Width, int32 Height);
PLIBEXP void		deleteOldCBitmap(pOldCBitmap This);

#define OldCBitmapWidth(This)		((This)->cSize.x)
#define OldCBitmapHeight(This)		((This)->cSize.y)
#define	OldCBitmapLock(pOldCBitmap)
#define	OldCBitmapUnlock(pOldCBitmap)

void	OldCBitmapBitmapBlt(pOldCBitmap This, int32 dx, int32 dy, pOldCBitmap Src);
void	OldCBitmapTransparentBitmapBlt(pOldCBitmap This, int32 dx, int32 dy,
			pOldCBitmap Src);
void	OldCBitmapBitmapBltSection(pOldCBitmap This, int32 dx, int32 dy,
			int32 sx, int32 sy, int32 sw, int32 sh, pOldCBitmap Src);
void	OldCBitmapTransparentBitmapBltSection(pOldCBitmap, int32 dx, int32 dy,
			int32 sx, int32 sy, int32 sw, int32 sh, pOldCBitmap Src);

// PUBLIC Platform interface
//
pOldCBitmap	newOldCBitmapFrame(int32 Width, int32 Height, HDC BmpDC);
#define OldCBitmapBits(This)		((This)->cBits)
#define OldCBitmapHBmp(This)		((This)->chBmp)
#define	OldCBitmapRowBytes(This)	((This)->cRowBytes)
#define OldCBitmapUpsideDown(This)	((This)->cUpsideDown)
bool8	OldCBitmapConstruct(pOldCBitmap, int32, int32, char *, HDC);
bool8	OldCBitmapConstructFromBMP(pOldCBitmap, pCBmp);
void	OldCBitmapDestruct(pOldCBitmap);
void	OldCBitmapNewPalette(LOGPALETTE *);
void	OldCBitmapClear(pOldCBitmap This);
void	OldCBitmapClearRect(pOldCBitmap This, int32 Left, int32 Top,
			int32 Right, int32 Bottom);
void	OldCBitmapFillRect(pOldCBitmap This, int32 Left, int32 Top,
			int32 Right, int32 Bottom, uint8 Color);
#define OldCBitmapRestoreSurfaces()	/* do nothing */


#endif
